/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package WebServices;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;

/**
 *
 * @author administrator
 */
@WebService()
public class TemperatureConverter {

    /**
     * Web service operation
     */
    @WebMethod(operationName = "convertCelsiusToFahrenheit")
    public int convertCelsiusToFahrenheit(@WebParam(name = "p_celsius")
    int p_celsius) {
        //TODO write your implementation code here:
        return (p_celsius * 9 / 5 ) + 32;
    }

    /**
     * Web service operation
     */
    @WebMethod(operationName = "convertCelsiusToKelvin")
    public int convertCelsiusToKelvin(@WebParam(name = "p_celsius")
    int p_celsius) {
        //TODO write your implementation code here:
        return (p_celsius + 273);
    }

    /**
     * Web service operation
     */
    @WebMethod(operationName = "convertKelvinToCelsius")
    public int convertKelvinToCelsius(@WebParam(name = "p_kelvin")
    int p_kelvin) {
        //TODO write your implementation code here:
        return (p_kelvin - 273);
    }

    /**
     * Web service operation
     */
    @WebMethod(operationName = "convertKelvinToFahrenheit")
    public int convertKelvinToFahrenheit(@WebParam(name = "p_kelvin")
    int p_kelvin) {
        //TODO write your implementation code here:
        return (p_kelvin*9/5) - 460;
    }

    /**
     * Web service operation
     */
    @WebMethod(operationName = "convertFahrenheitToCelsius")
    public int convertFahrenheitToCelsius(@WebParam(name = "p_fahrenheit")
    int p_fahrenheit) {
        //TODO write your implementation code here:
        return (p_fahrenheit - 32)*5/9;
    }

    /**
     * Web service operation
     */
    @WebMethod(operationName = "convertFahrenheitToKelvin")
    public int convertFahrenheitToKelvin(@WebParam(name = "p_fahrenheit")
    int p_fahrenheit) {
        //TODO write your implementation code here:
        return (p_fahrenheit + 460)*5/9;
    }
    

}
